﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListOrganisations.ascx.cs"
    Inherits="ServicesDirectory.UserControl.ListOrganisations" %>
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
    <ContentTemplate>
        <div class="bgManager">
            <div class="TitleManarer">
                Organisation List
            </div>
            <div class="sortList">
                <span>
                    <asp:LinkButton runat="server" ID="lbtAll" Text="All" TabIndex="9"></asp:LinkButton>
                </span>| <span>
                    <asp:LinkButton runat="server" ID="lbt09" Text="0-9" TabIndex="1"></asp:LinkButton>
                </span>| <span>
                    <asp:LinkButton runat="server" ID="lbtA" Text="A B C D E" TabIndex="2"></asp:LinkButton>
                </span>| <span>
                    <asp:LinkButton runat="server" ID="lbtF" Text="F G H I J"></asp:LinkButton>
                </span>| <span>
                    <asp:LinkButton runat="server" ID="lbtK" Text="K L M N"></asp:LinkButton>
                </span>| <span>
                    <asp:LinkButton runat="server" ID="lbtO" Text="O P Q R"></asp:LinkButton>
                </span>| <span>
                    <asp:LinkButton runat="server" ID="lbtS" Text="S T U V"></asp:LinkButton>
                </span>| <span>
                    <asp:LinkButton runat="server" ID="lbtW" Text="W X Y Z"></asp:LinkButton>
                </span>
                <div class="topbutton">
                    <asp:Button CssClass="button" runat="server" ID="cmdCreate" Text="Create" OnClick="CmdCreateClick" />
                    <asp:CheckBox runat="server" AutoPostBack="True" ID="chkInactive" 
                        Text=" Include In-Active" TabIndex="1" />
                </div>
            </div>
            <div class="spaceManager">
            </div>
            <div class="contentGrid">
                <div class="hearderGrid">
                    <div class="OrganisationHeaderCol1">
                        <asp:LinkButton runat="server" ID="lbtOrderOrgName" Text="Organisation Name"></asp:LinkButton>
                    </div>
                    <div class="OrganisationHeaderCol2">
                        <asp:LinkButton runat="server" ID="lbtAddress" Text="Head Office Address Line1"></asp:LinkButton>
                    </div>
                    <div class="OrganisationHeaderCol3">
                        <asp:LinkButton runat="server" ID="lbtPostcode" Text="PostCode"></asp:LinkButton>
                    </div>
                    <div class="OrganisationHeaderCol4">
                        <asp:LinkButton runat="server" ID="lbtContact" Text="Contact"></asp:LinkButton>
                        </div>
                    <div class="OrganisationHeaderCol5">
                        Is Active?</div>
                </div>
                <asp:Repeater runat="server" ID="rptOrganisation" OnItemCommand="RptOrganisationItemCommand"
                    OnItemDataBound="RptOrganisation_ItemDataBound">
                    <ItemTemplate>
                        <div class="rowGrid">
                            <div class="OrganisationContentCol1">
                                <asp:LinkButton ForeColor="#0000FF" runat="server" ID="lbtOrgName" CommandName="Detail"
                                    CommandArgument='<%#Eval("OrgId") %>' ToolTip='<%#Eval("OrgName") %>' Text='<%#Eval("OrgName").ToString().Length>23?string.Concat(Eval("OrgName").ToString().Substring(0,20),"..."):Eval("OrgName") %>'></asp:LinkButton></div>
                            <div class="OrganisationContentCol2">
                                <asp:Label ID="Label1" runat="server" ToolTip='<%#Eval("AddressLine1")%>' Text=' <%#Eval("AddressLine1").ToString().Length > 23 ? string.Concat(Eval("AddressLine1").ToString().Substring(0, 20), "...") : Eval("AddressLine1")%>'></asp:Label>
                            </div>
                            <div class="OrganisationContentCol3">
                                <asp:Label runat="server" ID="lblPostcode" Text='<%#Eval("AddressId") %>'></asp:Label></div>
                            <div class="OrganisationContentCol4">
                                <asp:Label runat="server" ID="lblContactName" Text='<%#Eval("ContactId") %>'></asp:Label></div>
                            <div class="OrganisationContentCol5">
                                <asp:Label runat="server" ID="lblIsactive" Text='<%#Eval("IsActive") %>'></asp:Label>
                            </div>
                        </div>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <div class="alterRowGrid">
                            <div class="OrganisationContentCol1">
                                <asp:LinkButton runat="server" ForeColor="#0000FF" ID="lbtOrgName" CommandName="Detail"
                                    CommandArgument='<%#Eval("OrgId") %>' ToolTip='<%#Eval("OrgName") %>' Text='<%#Eval("OrgName").ToString().Length>23?Eval("OrgName").ToString().Substring(0,20)+"...":Eval("OrgName") %>'></asp:LinkButton></div>
                            <div class="OrganisationContentCol2">
                                <asp:Label ID="Label1" runat="server" ToolTip='<%#Eval("AddressLine1")%>' Text=' <%#Eval("AddressLine1").ToString().Length > 23 ? string.Concat(Eval("AddressLine1").ToString().Substring(0, 20), "...") : Eval("AddressLine1")%>'></asp:Label>
                            </div>
                            <div class="OrganisationContentCol3">
                                <asp:Label runat="server" ID="lblPostcode" Text='<%#Eval("AddressId") %>'></asp:Label></div>
                            <div class="OrganisationContentCol4">
                                <asp:Label runat="server" ID="lblContactName" Text='<%#Eval("ContactId") %>'></asp:Label></div>
                            <div class="OrganisationContentCol5">
                                <asp:Label runat="server" ID="lblIsactive" Text='<%#Eval("IsActive") %>'></asp:Label>
                            </div>
                        </div>
                    </AlternatingItemTemplate>
                </asp:Repeater>
                <asp:Panel runat="server" ID="pnNorecord" Visible="false" CssClass="alterRowGrid">
                    <center>
                        No record found!</center>
                </asp:Panel>
                <div class="spaceManager">
                </div>
                <div class="PagingList">
                    <span>
                        <asp:Button runat="server" CssClass="backAllList" ID="cmdBackAll" />
                    </span><span>
                        <asp:Button runat="server" CssClass="backList" ID="cmdBacklist" /></span> <span style="padding-left: 5px;">
                            Page</span> <span style="padding-left: 5px;">
                                <asp:TextBox Text="1" runat="server" Width="20px" ID="txtPageNumber"></asp:TextBox></span>
                    <span>of</span> <span>
                        <asp:Label runat="server" Text="1" ID="lblTotalPage"></asp:Label></span> <span>
                            <asp:Button runat="server" CssClass="nextAll" ID="cmdNextAll" />
                        </span><span>
                            <asp:Button runat="server" CssClass="nextList" ID="cmdNext" />
                        </span>
                </div>
            </div>
            <div class="spaceManager">
            </div>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
